package com.example.order_system.service;

import com.example.order_system.mapper.OrderMapper;
import com.example.order_system.model.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @description:
 * @author: chengbaiyi
 * @create: 2022-07-22 20:53
 */
@Service
public class OrderService {
    @Autowired
    private OrderMapper orderMapper;

    public void addOrder(Order order) {
        orderMapper.addOrder(order);
    }

    public List<Order> orderList(String uid) {
        return orderMapper.orderList(uid);
    }

    public int updateOrder(Integer oid, Integer state) {
        return orderMapper.updateOrder(oid, state);
    }
}
